package com.fyzk.betcode;


import com.fyzk.activity.lottery.shuzicai.BallInfo;
import com.fyzk.bean.ZCGameQueueItem;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 彩票投注注码管理类
 *
 */
public class AppLotteryCodeListManager {
	
	private List<BetLotteryInfo> infos;
	private List<ZCBetInfo> zc_infos;

	public static final int FIRSTENTER = 0;
	public static final int ADDCODE = 1;
	public static final int MODIFICATIONCODE = 2;
	public static final int OKTOBACK = 3;
	public static final int SAVECODE = 4;	// 保存号码
	public static int betType = FIRSTENTER;
	public static int chooseId = 0;

	private static AppLotteryCodeListManager instance ;
	
	private AppLotteryCodeListManager(){
		infos = Collections.synchronizedList(new ArrayList<BetLotteryInfo>());
		zc_infos = Collections.synchronizedList(new ArrayList<ZCBetInfo>());
	}
	
	public static AppLotteryCodeListManager getInstance(){
		if(instance == null){
			instance = new AppLotteryCodeListManager();
		}
		return instance;
	}
	
	/**
	 * 添加数字彩投注信息
	 * @param wcodeID
	 * @param codeNum
	 * @param showZhuMa
	 * @param zhushu
	 * @param arr_infos
	 * @param popupID
	 */
	public void AddLotteryInfo(int wcodeID,String codeNum,String showZhuMa, long zhushu
			, List<List<BallInfo>> arr_infos, int popupID){
		BetLotteryInfo info = new BetLotteryInfo(wcodeID,codeNum,showZhuMa,zhushu,arr_infos, popupID);
		infos.add(0, info);
	}
	
	public BetLotteryInfo NewBetInfo(int wcodeID,String codeNum,String showZhuMa,long zhushu
			, List<List<BallInfo>> arr_infos, int popupID){
		return new BetLotteryInfo(wcodeID,codeNum,showZhuMa,zhushu,arr_infos, popupID);
	}
	public BetLotteryInfo NewBetInfo(){
		return new BetLotteryInfo();
	}
	
	public void setList(List<BetLotteryInfo> infos) {
		this.infos = infos;
	}
	public List<BetLotteryInfo> getList(){
		return infos;
	}
	
	/**
	 * 添加足彩投注信息
	 * @param wcodeID
	 * @param codeNum
	 * @param showZhuMa
	 * @param zhuShu
	 * @param phase
	 * @param infors
	 */
	public void AddZCInfo(int wcodeID,String codeNum,String showZhuMa, long zhuShu
			, String phase, List<ZCGameQueueItem> infors){
		ZCBetInfo info = new ZCBetInfo(wcodeID, codeNum, showZhuMa, zhuShu, phase, infors);
		zc_infos.add(0, info);
	}
	
	/**
	 * 添加足彩投注信息
	 * @param wcodeID
	 * @param codeNum
	 * @param showZhuMa
	 * @param zhuShu
	 * @param phase
	 * @param infors
	 */
	public void setZCInfo(int wcodeID,String codeNum,String showZhuMa, long zhuShu
			, String phase, List<ZCGameQueueItem> infors){
		zc_infos.clear();
		ZCBetInfo info = new ZCBetInfo(wcodeID, codeNum, showZhuMa, zhuShu, phase, infors);
		zc_infos.add(0, info);
	}
	
	
	private List<ZCGameQueueItem> infors;
	
	/**
	 * 添加足彩投注对阵信息
	 * @param infors
	 */
	public void setFootball14QueueInfo(List<ZCGameQueueItem> infors){
		if(null == this.infors){
			this.infors = new ArrayList<ZCGameQueueItem>();
		}
		this.infors.addAll(infors);
	}
	/**
	 * 得到足彩投注对阵信息
	 * @return
	 */
	public  List<ZCGameQueueItem>  getFootball14QueueInfo(){
		return infors;
	}
	
	
	
	public List<ZCBetInfo> getZCBetInfoList(){
		return zc_infos;
	}

}
